;; Test define function with set! using lambda syntax
(display "Testing define with lambda and set!\n")

(define counter 0)
(display "counter before: ")
(display counter)
(display "\n")

;; Use explicit lambda syntax instead of shorthand
(define increment (lambda () (set! counter (+ counter 1)) counter))
(display "Function defined successfully!\n")

(display "(increment) = ")
(display (increment))
(display "\n")
(display "counter after increment: ")
(display counter)
(display "\n")